set(client_pin_auth_src src/client_pin_auth.c)

add_library(client_pin_auth_obj OBJECT ${client_pin_auth_src})
target_include_directories(client_pin_auth_obj PUBLIC inc)
target_include_directories(client_pin_auth_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_INC})
target_compile_options(client_pin_auth_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_CC})
target_link_libraries(client_pin_auth_obj PRIVATE client_base_obj)
target_link_libraries(client_pin_auth_obj PRIVATE se_base_services_defines)
target_link_libraries(client_pin_auth_obj PRIVATE logger_obj)
target_link_libraries(client_pin_auth_obj PRIVATE se_modules_pin_auth_ipc_proxy_obj)
if(OPTION_SECUREC_INDEPENDENT)
    message(STATUS "client_pin_auth_obj use independent secure c.")
    target_link_libraries(client_pin_auth_obj PRIVATE securec_interface)
endif()

add_library(client_pin_auth_so SHARED)
target_link_options(
    client_pin_auth_so
    PRIVATE
    ${SHARED_LINKER_FLAGS}
)

target_link_libraries(client_pin_auth_so PUBLIC client_base_obj)
target_link_libraries(client_pin_auth_so PUBLIC logger_obj)
target_link_libraries(client_pin_auth_so PUBLIC parcel_obj)
target_link_libraries(client_pin_auth_so PUBLIC client_pin_auth_obj)
target_link_libraries(client_pin_auth_so PUBLIC se_base_services_defines)
target_link_libraries(client_pin_auth_so PUBLIC se_modules_pin_auth_ipc_proxy_obj)

set_target_properties(client_pin_auth_so PROPERTIES OUTPUT_NAME "combine")

file(COPY inc/client_pin_auth.h DESTINATION "${CMAKE_SOURCE_DIR}/output/")
hw_sign_ta(client_pin_auth client_pin_auth.so.sec)
